import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);
const  store =new Vuex.Store({
  state:{
    count:1
  },
  getters:{
    gerStateCount:function (state) {
      return state.count +1;

    }
  },
  mutations:{
    add(state){
      state.count=state.count+1;
    },
    removeaddf(state){
      state.count=state.count-1;
    }
  },
  actions:{
    addfun(context){
       context.commit("add")
    },
    removeadd(context){
      context.commit("removeaddf")
    }
  }
});



export default store;
